package fmglemmings;

import java.awt.Color;
import java.awt.Graphics;

public abstract class ViewObject {
	protected MapObject buisnessObject;
	private int X;
	protected Color MyColor;
	private int Y;
	protected static final int CELLX=25;
	protected static final int CELLY=25;
	
	protected int dir;
        protected boolean dest;
	
	protected void drawme(Graphics g){
		g.setColor(MyColor);
		g.fillRect(0,0,CELLX-1,CELLY-1);
//		System.out.println("rajzolást befejeztem");
	}
	public void draw(Graphics g, MapObject bo) {
		buisnessObject = bo;
		getData();
		drawme(g);
	}
	
	private void getData() {
		X = buisnessObject.getX();
		Y = buisnessObject.getY();
		dir = buisnessObject.getDirection();
                dest = buisnessObject.isDestructable();
	}
	
	public ViewObject(){
		MyColor=Color.GREEN;
	}
	
}

